import $ from 'jquery'

// 序列化表单元素函数，计算当前玩法的总金额
function addCount (eleForm) {
	var arr = []
	var arrTwo = []
	let otherForm = ''
	var otherCount = 0
	otherForm = $(eleForm).serialize()
	arr = otherForm.split('&')
	for(let i = 0; i < arr.length; i++) {
		arrTwo = arr[i].split('=')
		if(arrTwo[1] != '') {
			otherCount += parseInt(arrTwo[1])
		}
	}
	return otherCount
}

export default addCount